code: def delete_item(self):
          
          data = self.get_selected_item()
          if data.get('author') != self.reddit.user.name:
              self.term.flash()
              return
  
          prompt = 'Are you sure you want to delete this? (y/n): '
          if not self.term.prompt_y_or_n(prompt):
              self.term.show_notification('Canceled')
              return
  
          with self.term.loader('Deleting', delay=0):
              data['object'].delete()
              # Give reddit time to process the request
              time.sleep(2.0)
  
          if self.term.loader.exception is None:
              self.reload_page()
docs: Delete a submission or comment.