MCPcopy
hub / github.com/ayn2op/discordo / selectedMessage

Method selectedMessage

internal/ui/chat/messages_list.go:843–854  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

841}
842
843func (ml *messagesList) selectedMessage() (*discord.Message, bool) {
844 if len(ml.messages) == 0 {
845 return nil, false
846 }
847
848 cursor := ml.Cursor()
849 if cursor == -1 || cursor >= len(ml.messages) {
850 return nil, false
851 }
852
853 return &ml.messages[cursor], true
854}
855
856func (ml *messagesList) Update(msg tview.Msg) tview.Cmd {
857 switch msg := msg.(type) {

Callers 10

yankMessageIDMethod · 0.95
yankContentMethod · 0.95
yankURLMethod · 0.95
openMethod · 0.95
replyMethod · 0.95
editSelectedMessageMethod · 0.95
deleteSelectedMessageMethod · 0.95
ShortHelpMethod · 0.95
FullHelpMethod · 0.95
sendMethod · 0.80

Calls 1

CursorMethod · 0.95

Tested by

no test coverage detected